import * as lib from "../src/index";

const items = [
    {type1:"河南省",type2:"确山县",type3:"任店镇"},
    {type1:"广东省",type2:"南山区",type3:"西丽镇"},
]

var tree = lib.groupTreeBy(items,({type1,type2,type3})=>[type1,type2,type3]);
console.log(tree)


var flat = lib.flatGroupTree(tree);
console.log(flat);


const frag = lib.toJSONArrayFragment([1,2,{},3,4],3);
console.log(frag);